
const mysql = require("mysql")
const database = require("../config/database.js")
// 自动执行
const client = mysql.createConnection({
    host:database.host,
    port:database.port,
    user:database.user,
    password:database.password,
    database:database.database,
})
client.connect(function(err){
    if(err){
        console.error("连接数据库异常",err)
    } 
})

module.exports =  client ;